/**
 * Licensed under the Apache License Version 2.0.
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */
package net.interknit.knitter.fw.types;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name = "net.interknit.knitter.fw.types.Date")
public class BigDouble
{
	/**
	 * The underlying state maintained by this adapter
	 */
	private java.math.BigDecimal value;

	/**
	 * Default no-arg constructor
	 */
	public BigDouble() { ; }

	/**
	 * Construct this instance from the Object parameter.
	 *
	 * @throws ClassCastException if the parameter obj is not of type java.util.Date
	 */
	public BigDouble(java.lang.Object obj)
	{
		this((java.math.BigDecimal) obj);
	}

	/**
	 * Constructor to accept the user values and convert it to the underlying state.
	 * In other words, this constructor provides a way for "wrapping" the user value into this adapter.
	 * This constructor is also known as 'value constructor'
	 */
	public BigDouble(java.math.BigDecimal value)
	{
		this.value = value;
	}

	/**
	 * Adapter method to convert the underlying state back to user value.
	 * In other words, this method provides a way for "unwrapping" the user value from this adapter that
	 * was previously wrapped using the value constructor.
	 */
	public java.math.BigDecimal unwrap()
	{
		return value;
	}

	/* Getters and Setters */

	/**
	 * Return the underlying state of this adapter.
	 *
	 * @return the underlying state of this adapter
	 */
	public java.math.BigDecimal getValue()
	{
		return value;
	}

	/**
	 * Sets the underlying state of this adapter with the given state parameter.
	 *
	 * @param value the underlying state to set
	 */
	public void setValue(java.math.BigDecimal value)
	{
		this.value = value;
	}
}

